<%--
    Document   : admin
    Created on : Apr 22, 2010, 3:36:22 PM
    Author     : Dian Paskalis
--%>

<% /*
    if(session.getAttribute("ichat.usertype").equals("ADMIN")){
        //Enter this page
    }else if(session.getAttribute("ichat.usertype")!= null){
        response.sendRedirect("list.jsp");
    }else{
        response.sendRedirect("index.jsp?login_attempt=1");
    }
     */
%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Admin Page</title>
        <title>List</title>
        <link rel="stylesheet" href="includes/css/resetter.css" type="text/css"/>
        <link rel="stylesheet" href="includes/css/ichat.css" type="text/css"/>
        <link href="includes/sitemapstyler/sitemapstyler.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="includes/sitemapstyler/sitemapstyler.js"></script>
    </head>
    <body>
        <div id="wrap">
            <div id="top">
                <div class="container"><a href="logoutServlet">LogOut</a></div>
            </div>
            <div class="container">
                <div style="width: 100%"><img src="includes/img/logo.png" alt="ichat"/></div>
                <div id="block" style="width:600px; text-align:left; float:left">
                    <div id="tab">
                        <div class="tab_child cur">Administrative Page</div>
                    </div>
                    <div class="admin">
                        <b><p>Ubah status user:</p></b>
                        <table width="700px" cellspacing="0">
                           <thead><tr>
                              <td width="5%" style="text-align:left" >No.</td>
                              <td width="20%">Username</td>
                              <td width="20%">Status</td>
                              <td width="20%">Ubah status</td>
                           </tr></thead><% out.print(request.getAttribute("user").toString()); %>
                        </table>
                    </div>
                    <div class="admin">
                        <b><p>Tambah Fakultas:</p></b>
                        <form method="post" action="adminServlet">
                            <input type="text" name="newfak" value="nama fakultas baru" onfocus="if(this.value=='nama fakultas baru'){this.value=''}" onblur="if(this.value==''){this.value='nama fakultas baru'}"/>
                           <button type="submit">tambah</button>
                        </form>
                        
                        <b><p>Ubah Fakultas:</p></b>
                        <table width="700px" cellspacing="0">
                           <thead><tr >
                              <td width="5%" style="text-align:left" >No.</td>
                              <td width="20%">Fakultas</td>
                              <td width="20%">nama baru</td>
                              <td width="20%">hapus</td>
                           </tr></thead><% out.print(request.getAttribute("fak").toString()); %>
                        </table>
                    </div>
                    <div class="admin">
                        <b><p>Tambah Prodi:</p></b>
                        <form method="post" action="adminServlet">
                            <input type="text" name="newprod" value="nama prodi baru" onfocus="if(this.value=='nama prodi baru'){this.value=''}" onblur="if(this.value==''){this.value='nama prodi baru'}"/>
                            <select name="fak4prod">
                                <% out.print(request.getAttribute("prodbaru").toString()); %>
                            </select>
                            <button type="submit">tambah</button>
                        </form>

                        <b><p>Ubah Prodi:</p></b>
                        <table width="700px" cellspacing="0">
                           <thead><tr >
                              <td width="5%" style="text-align:left" >No.</td>
                              <td width="20%">Prodi</td>
                              <td width="20%">nama baru</td>
                              <td width="20%">hapus</td>
                           </tr></thead><% out.print(request.getAttribute("prd").toString()); %>
                        </table><br/>
                        <table width="700px" cellspacing="0">
                           <thead><tr >
                              <td width="5%" style="text-align:left" >No.</td>
                              <td width="20%">Prodi</td>
                              <td width="20%">Fakultas</td>
                              <td width="20%">Ubah</td>
                           </tr></thead><% out.print(request.getAttribute("prdfak").toString()); %>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div id="footer">
	<div class="container">
		<span class="highlight-color">Copyright &copy; 2010 Informatika ITB</span>
	</div>
        </div>
    </body>
</html>